﻿using Abp.Runtime.Validation;
using Camc.Quality.Dto;
using System;

namespace Camc.Quality.WorkFlow
{
    public class ApplicationLogDto : PagedAndSortedInputDto, IShouldNormalize
    {

        /// <summary>
        /// 业务编号
        /// </summary>
        public string BusinessNumber { get; set; }
        /// <summary>
        /// 业务描述
        /// </summary>
        public string BusinessDesc { get; set; }
        /// <summary>
        /// 发起时间
        /// </summary>
        public DateTime? ApplicationDate { get; set; }
        /// <summary>
        /// 业务Id
        /// </summary>
        public Guid BAppId { get; set; }
        /// <summary>
        /// 审办人
        /// </summary>
        public long OperationtId { get; set; }
        /// <summary>
        /// 操作动作
        /// </summary>
        public string OperationtContent { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        public int? BAppType { get; set; }

        /// <summary>
        /// 功能模块
        /// </summary>
        public string FunModule { get; set; }
        /// <summary>
        /// 菜单
        /// </summary>
        public string Menu { get; set; }

        /// <summary>
        /// 发起人
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 申请人用户ID
        /// </summary>
        public long UserID { get; set; }

        /// <summary>
        /// 审批类型
        /// </summary>
        public string WfName { get; set; }

        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }
    }
}
